#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int input1 = 0;
    int input2 = 0;
    int quotient = 0;
    int remainder = 0;
    scanf("%d %d", &input1, &input2);
    quotient = input1 / input2;
    remainder = input1 % input2;
    printf("%d %d", quotient, remainder);
}